package dict

import (
	"mldong/api/base"

	"github.com/gogf/gf/v2/frame/g"
)

type SaveReq struct {
	g.Meta `path:"/sys/dict/save" tags:"字典管理" method:"post" summary:"添加字典"`
	DictParam
}
type UpdateReq struct {
	g.Meta `path:"/sys/dict/update" tags:"字典管理" method:"post" summary:"修改字典"`
	DictParam
}
type DetailReq struct {
	g.Meta `path:"/sys/dict/detail" tags:"字典管理" method:"post" summary:"字典详情"`
	ID     string `json:"id" dc:"字典ID" v:"required#请输入字典ID"`
}

type DetailRes struct {
	base.CommonResult
	Data DictVO `json:"data" dc:"字典信息"`
}
type RemoveReq struct {
	g.Meta `path:"/sys/dict/remove" tags:"字典管理" method:"post" summary:"删除字典"`
	Ids    []string `json:"ids" dc:"字典ID集合" v:"required#请输入字典ID集合|min-length:1"`
}
type PageReq struct {
	g.Meta `path:"/sys/dict/page" tags:"字典管理" method:"post" summary:"字典分页查询"`
	base.PageParam
}
type DictPageVO struct {
	base.PageVO
	Rows []DictVO `json:"rows" dc:"数据列表"`
}
type PageRes struct {
	base.CommonResult
	Data DictPageVO `json:"data" dc:"字典分页返回实体"`
}

type GetByDictTypeReq struct {
	g.Meta   `path:"/sys/dict/getByDictType" tags:"字典管理" method:"post" summary:"根据字典编码获取字典"`
	DictType string `json:"dictType" dc:"字典类型" v:"required#请输入字典类型"`
}
type GetByDictTypeRes struct {
	base.CommonResult
	Data []base.LabelValueVO `json:"data" dc:"字典列表"`
}

type EnumDictListReq struct {
	g.Meta `path:"/sys/dict/enumDictList" tags:"字典管理" method:"post" summary:"枚举字典"`
}
type CustomDictListReq struct {
	g.Meta `path:"/sys/dict/customDictList" tags:"字典管理" method:"post" summary:"自定义字典"`
}
type DictModelListRes struct {
	base.CommonResult
	Data []base.DictModelVO `json:"data" dc:"字典模型列表"`
}
